cleaned up somewhat. must do more!