after Ohad's refactoring