added random line function.