added a utils method and started adding tests