Code from guides copied and pasted.