integrated with Matts API and implemented pitch logic