Similarity of actions depends on the functionality of previously observed actions