making progress.
working version