added isValid methods, improved data access