MOD: add class config and finish the code