These three lines can be replaced with 'setintprop' similar to the use of setboolprop above.