Made convert function async and finished replacement function