nest code into list