Use promise for async handling
redundent line