add tests and plots