updated type parsing