main: initialise sgw system after the tables