add a couple tests for function types
add exception handling