add old polygon code to be  gone through and made to work at a later date