barebones main function