added new constraints to eventDemand and added functional tests closes #73