This implementation seems to be working!