updated boolean condition
updated doc