Added matrix calc
Updated matrix calc