fixex unit test and start working on messaging APIs