fixed mixing signs in analysis