remove complicated part of plotting code.