Added top level method (not quite correct yet tho)