Updated function to actually work with and return Polys instead of lists