Very basic working version of key checking