Adding functioning code to the functions.