created header file, moved work into main