finished h file finished input function - untested