Added Ilyv's changes