use prototypes for dom librarie's methods