change get from recursive to non-recursive