fixed row/column algo