changed all matlab variables to single