SALEM – A Lynn man who admitted dealing cocaine in Lynn and Salem was sentenced to serve 3-to-4-years in state prison.Juan Torres, also known as Alison Rosendo, 30, of 102 Hollingsworth St., changed his not guilty plea to guilty Tuesday afternoon in Salem Superior Court. He was charged with trafficking over 14 grams of cocaine and possession with the intent to distribute cocaine, second offense, involving two separate drug cases.Judge David A. Lowy sentenced him in accordance with an agreement reached by Assistant District Attorney James P. Gubitose and defense lawyer John P. Morrison.On Aug. 2, 1996 Salem police pulled over a vehicle on Bridge Street.Torres, a passenger in the back seat, was seen suspiciously reaching down under the seat.Salem police William Jennings and James Paige searched the back of the vehicle and discovered 23 grams of cocaine under where Torres was seated.At the time of his arrest, Torres told police his name was Alison Rosendo.Then on the afternoon of June 4, 2007, Torres sold three bags of cocaine for $100 to an undercover police officer on Bayview Avenue in Lynn and was arrested.The judge credited Torres the 260-days he has spent in the Middleton Jail awaiting trial on the two cases.