refactored seting