fix bug, add tests