add tests/optimization