make code more elegant