finished the functions problems