Functions for calculating inverse matrix and processing cache were added