generalizing a bit