lots of mistakes corrected
gateway protocol ok