cleaned up contact code