add data layer (need refactoring)