Add functions from vista repo