refactored to joomla 3.0.1