add validations and fault tolerance