moved isActive to the end