refactored blocking logic