refactored and fixed defaults