added if statment for messages in inbox