add some changes on up to line 250