Replaced old methods with updated ones using line sensors