refactor async load callback funtion