added some basic logic for key pegs