implemented rough draft of updates loop