preliminary port to d7 - working