bug fixes

reverted back to checking the numeric value and changed how the
optional parameters are tested.