changed some vars to bool