fix output
Add comments and TODO