first fix, still not perfect