added key manipulation functionality