add stuffs in smart.c