addressed the return statement issue