added more tests and started implementing recursive implementation of inject