#46: fixed indentation and added some documentation