updated to async loaddir