server query building

trip from_activity and to_activity
pass test