takes care of rows of all zeros and added new objective funtion
takes care of rows of all zeros and added new objective funtion