moving functionality to reaction handler from reactions