modified some parts of the formal defn