works for order 3, not for order 4.
Added function from online site for testing...