relocated matrix procedures (for real now)