added more row logic js