Repairs to code to accomodate powerpoint