change parameter name for more understandable
add structs and functions to document