implement bitcoin function