better exception handling and brpoplpush