add first part of matlab script