prelim version of hw1 assignment