fixes and exteded output