updated Yonatan's changes 08-04-2014