refactored view logic for accept and cancel request