add schedule algorithm