mtecs: change main functions to int and add some comments
mtecs: check if input arguments are finite