making ok button listener