type checker now handles simple functions