adjusted bool and added more comments