clarified the definition of advantage
corrected implementation of advantage