added key press send func
changed it accordingly