refactor down once more
basic working
add mask
re-factor ESC