add sample app code and details about initialization