added SR Latch