got rid of row based logic