add settings logic