added "if not exists" statement