Update CS and add tests