messaging funtion layout 40% finished