rewiring this whole mess