revamped code, good mining, needs better attack