changes after Pieter's review