more work, still needs some refining