using floydpink's method (DSA)