validate instead of manual checking