Finally a faster solution