service gateway rework
merge and resolve conflict