add calculator to tree utilities
add tests