properly use loc