compute Cost