add tests, global vars