The role of action in perceiving and comparing functional relations