renamed component to hat so require('hat') works