more functional added in matrix