moved all top line detection functions to top_line_detection.py