Removed duplicate function