Since you keep repeating this code, it should be in a function.