some code for sugarcrm6x