Yep, yor already doing the right thing :P IT just takes time. You play slowly, with a metronome. Then when you feel comfortable, put the metronome faster and pratice again. And you go on like that until you can play it at the right tempo. There's no tricks really with speed. Practice practice practice.