added pretty_print function and debugged modify_dict