fix bug in getPrivateMesages

+add inheritance: PrivateMessage extends Message