Moving functionality into utils