refactor, comments, update save_range function