Original source

Adding original source code used on chat implementation from
marcosps