thread for mapping