added NewCustomMatrix()

This was getting done in 5 places throught the file so maid it a
function