ok, this is not perfect, but bettern than it was before