Write tests and beginnings of output parameter