refactor add system inner class