Changing print statement to return