Refactor second time, the last one does not work