working on database validation