implemented Messages command