made use of bolean instead of int for some variables/functions