Removed unused helper function