added Capsule class