change puts to return