implementing method to store text messages in inbox