introduced methods and structures to reduce code further