some comments added and fixed change profile with None