added code for metadata and position tracking
get rid of set_runtime