basic implementation of check routine