update

- finished preliminary implementation
- while loop implementation buggy
- does not handle errors well yet