refactoring

refactor: remove local variables
refactor: left to indent
add semicolon
add red test