changed the interface of balance_semaphores() : pass in $filter_analysis_id instead of $filter_analysis