changes from SamT