implements tests and required functions