Multitouch drag and rotate

Hi! Can someone tell me how to make function rotate affect targets of function drag? Code here

function rotateRight(event) if event.phase == "began" then platform.rotation = platform.rotation - 10 end end

local function startDrag( event ) local t = event.target local phase = event.phase if "began" == phase then display.getCurrentStage():setFocus( t ) t.isFocus = true t.x0 = event.x - t.x t.y0 = event.y - t.y event.target.bodyType = "kinematic" event.target:setLinearVelocity( 0, 0 ) event.target.angularVelocity = 0 elseif t.isFocus then if "moved" == phase then t.x = event.x - t.x0 t.y = event.y - t.y0 elseif "ended" == phase or "cancelled" == phase then display.getCurrentStage():setFocus( nil ) t.isFocus = false if ( not event.target.isPlatform ) then event.target.bodyType = "dynamic" end end

I want to make dragged object rotate when I click on rotate button