trying to do a naive implementation of alg 1 so I'm on board