made methods to make code more readable