remove matt code, fix plotting issue