document width and height implemented!