updated entity mongo replica and code for overide stuff