added types
simplified utils