added handling of extra parameters