add coords and remove some bugs v0.37