add ability to choose between matlab and binary