Smart ink