interaction.h functions changed (added template)