tested functions against the sample test case...need to write moar tho