First release, working for simple triangle, need to be debugged for more complex examples