finished square functions, moving to triangle