just by calling everything within a function it runs faster