removed unused helper function