main and settings