added update pos func, needs testing