almost finalized... needsm ore testing