remove unused function & update tests