created the functions