updated for new gateway