made some changes from C9