goalpost detection almost completed, need to extract only the characteristics
formatted code for goalpost detection