output from functions as 2 arrays