handling messages part 1