creating functions complete.