fixing return statement