abstracted number keysyms into loops