change method signature to not use boolean trap.