1. add support to pass as dictionary for setPreference 2. add README