missing return statement in output code