append to list correctly