Updated based on suggestion from @kevinswiber