some fine tuning and commenting