finished problem 29, moved reusable functions to util class
finished problem 30
finished problem 32
finished problem 40