made keep/discard buttons work