got rid of primitive_type and its helpers