matlab functions added