this is basically the final program