factored out classes and constants