adding some new stuff and bug fixes.