refactored and added access point configuration