added smart app code