working on plotitng code