add print function
add lock
update set grid coords