Code which was submitted

There is a problem of few messages getting lost which could not be
traced. But submitted this version.