deleted repetitive javascript