wrong return value solved