bug fixes, more testing