Version 1.3 with better output