first working version--still needs edits