Get rid of a duplicate function