Adding reactions to function