put the key inputs in main only