missing return in function