fixed bug: return statement added