add getMessages method in interface