improve previous commit. But BAD CODE. refactor expected