removing duplicate function