Added settings logic