adds polygon functionality