WCM-9 move code from user_segment_actions to another file