small changes to reduce complexity