added inline plotting