some fixes for understanding code