address discussion and add tests