added conditional for lat long in index controller