refactored
added async
fix defaultAttributes getting modified in _getAttributes