creating dao layer Fixes #2