TODO: DRY up the code Finish spec'ing Allow specification of any parameter?