learnyounode's solution is better