solve bugs for return