remove functools
more helpful wrt parsing
add get_fn() and get_grad_fn()