Fixed typo, added utility function