endorsements function works