accept and reject button logic