integrating changes from horizon branch