fixed some plotting added some util