add functions to operate with type different from matrix value