Fixed mistake by changing list append to list concatenation