simple CPU usage optimization