public function add($type, $message, $data = FALSE, $title = FALSE)
  {
	  $messages = $this->_session_get();
	  
	  if (!is_array($messages)) {
		
		$messages = array();
	  }
	  
	  if (is_a($message, 'Exception')) {
		  	
		  $title = 'Exception Thrown!';
		  
		  $message = $message->getMessage();
		  
		  $type = 'error';
	  }

      $msg = array('type'=>$type,'title'=>$title);      
  	  
	  $msg['text'] = is_array($data) ? vsprintf($message, $data) : sprintf($message, $data);
   
	  $messages[] = (object)$msg;

      $this->_session_set($messages);	  
	   	
      return $this;
  }