updated to conform with current format
submit deals with ranges, simplified argument handling with case statement