implemented location timer and removed dead code