improved sample app