tweaked algorithm and added placeholder method to test with