a bit reduce code