changes for key checking