Adding Emil's changes