adding a new function for Ben, adding tests.