added backward computation