programming assignment II completed; computing inverse & cache