program functions complete