added a class and working on database