changed zigzig method