Adding method to modify preferences