Add some codes for supporting simple mode