add tests and scripts