fixed create marker function