refactored receiver, should work better now.