adding config command, refactoring config