added printing and returning