fixing performance gain calculation