some definitions changed
rows_num -> num_rows