should not submit anything if locations is empty