Simplifying the code setting marker pos.