added styles and refactored build func