made global message function