compressed version of above changes