moving array functions into helper module
keeping state in url