commented code and added settings