Improving ordering not to change lines
Adding test