Added reading preferences to code