add TODO
add pattern-matching branches to fun