fetch codes asynchronously