filled in the functions