Adding functions for handling app message