create the functions