working on triangular numbers