refactored the make new marker code in marker controller