implement "check" functionality