try to reduce code