abstract out event into partial