changed bool -> int