refactored with scripts with objects
adds .keyup() to scripts