made message sending functions return promises