add validation and resolving