 		result = ''
 		result += Math.random().toString(36).substr(2,1) for i in new Array(len)
 		result.toUpperCase()
-	update: ->
-		self = @
+	divsToPs: ->
 		#transform divs to ps
 		@saveSelection()
 		$('#editor div').not('[name]').each ->

		$('#debug-keyup').text e.keyCode

		switch e.keyCode
			when 16
				@status.shift = false
				$('.shift').addClass('hidden')

			$(@).after(el)
			$(@).remove()
		@restoreSelection()
	update: ->
		self = @
		# giving names
		$('#editor p,h1,h2,pre').not('[name]').each ->
			$(@).attr 'name', self.rand()
