Romans 6:16-17

6:16 Do you not know that if you present yourselves as obedient slaves, you are slaves of the one you obey, either of sin resulting in death, or obedience resulting in righteousness? 6:17 But thanks be to God that though you were slaves to sin, you obeyed from the heart that pattern of teaching you were entrusted to,

Romans 6:20

6:20 For when you were slaves of sin, you were free with regard to righteousness.