add unit tests for check