correct logic