Added logic to detect start part