updated code to accept matrix starting point as 1,1