implemented reject functionality