added methods to message dao;