logic is now correct, but contact definitions still need some work