- refactor into function

- spaces as intendation