add functions for mark postion and generate scan map