finished postlab optimizations