works on matlab 2012b now