getSources now needs width and height