Coding the functions complete