bug fixing with lists