Created function for CRB calculation