added generic dao pattern