perform simple return statement checking in functoins