implementing validation methods