renamed some varialbes and added doc