Better implementation, I think this way will work for all versions.