added saveOrUpdate and validate methods