optimized program a bit