Changed document constructor to take a sting as an argument