modify to remove unused function