added tests for contact logic