added if statements incase tehre is no stored loc