added outer return statement