this is the first attempt at the test and map function