finished first sequential version