create new function for api polygon feature