adding basic implementation of messaging system; but could not get key event working