got inverting matrices to work magically
resolved merge conflicts