Homework 10a commit. Added type object pattern