removes unused function and renames another runction