fix up order of opperations