added unique database validation