use global variable
move clear_properties out of main()