refactored main theme