fixed the main function, class no longer necessary