Added polygon code