updated using harsh code