functions return type check now allows mixed types