Text this: Engineering the resistive switching properties of 2D WS2 memristor