adding preferences to sample app