task prototype and redirect with alert example