initial implementation for Validator class, not completed though