refactors function for adding mine to map