Updated blocking code