Changed to input doubles
Removed newMatrix/oldMatrix in place for plate