Added logic for contact machine