Romans 6:17-18

YLT(i) 17 and thanks to God, that ye were servants of the sin, and—were obedient from the heart to the form of teaching to which ye were delivered up; 18 and having been freed from the sin, ye became servants to the righteousness.