strides made in utility function. needs gamestate array rewrite