some plotting
merged with plot