adds key handling, file changes