minor fix (return bool instead of int)