boolean types and methods call in foreach fixed