added problem 4 soln and pimped seq type