delete repeated lines + add OA/OB for up/down