now it can create square thumbs
simplified
fixed