Created the functions