implemented Thomas algorithm...