switched from java to matlab