make code more abstract