improve the lifematrix.js