Before IDS; Partially tested;