refactored code for fetching extension settings