added message reader and tests