first stab at a type parser