improved plotting function and added a inspectChr function