used yield and fix spacing issue
adds puts to display message