Added some helper methods in Gateway