add publish method.

Signed-off-by: OwenPatey <owen_patey@hotmail.com>