first pass at problem 1