Removing a duplicate function