until function fixed