Working on database implementation