more abstract code style