change behaviour with simultaneously change width and height