added flatten function to lists and starting categories support