~ refactored okButtonHandler