I much prefer this implementation, its way easier to understand