merged piotr changes