fixed up main