wrote some stuff for mapping