refined bounds, updated img