Added implementation and tests for check