fixed uniqueness and check on adding new item to db