create theme and refactor code