mostly finished getting parameters