function takes in the specified width and height