Try part two

re-implementation with the Type class added on Parser.java