adds theme logic and template