maybe the constructor for the capsule should take source and target instead of source and direction because it is used this way