adds Mihai's changes