isEmpty() is added and list becomes public rather than private