Good. Have you checked that it returns the exact same results as the hard-coded version?