This also looks duplicated. You should place it into a function instead, cut down on the copy and paste.