exercise for data structure