overhaul, use jar and gem