boolean flags starting to work