added new criteria for width
added position array
added nothing
solved merge conflict