first version matrix input