setting Time and Price in preferences
Little refactoring