change function for generate Promela