moved opt.getLocation