functions complete