original matlab code works
java import