simplify read_key()
formatting