using with function to make code more readable