valid? method working