Add Yoav's improvements