some indentation and cleaning