move mains to top level