factorisation + bug in image width