add flag to save cpu cycles
cleanup