loc routine