some changes in variable naming and bool