Renamed "func" argument to "fun"

since "func" is a reserved word now.