fixing duplicate problem