hw1 without optimization