add tests & fix value unbound