Work on measure-finding function