typo/bug fixes; better output