modified to handheld 4 matrix