move location logic to separate model