redateo model and resource base, needs query stuff