refactoring prepare_deafults