paint messages and factory