added scanLine skeleton code