refactoring && add console command