correct indentation and rogue typ
add documentation