refactor
clean
format final output