added complete callback functionality