A bit faster version.