tests and functions written. some tests aren't passing despite the function being correctly defined (i think)