row sync: got rid of casting by applying generics