Removed old helper function