a bit more efficient