handling keys better