optimize variables