initial purchase&contract function