updating to use debug and add more tests