parse_type util function implemented, needs testing