dsa implementation