homework 2 with pre processig