added default increment of 1 if no value is given, changed coding