Made few changes, better output