factored out constants and classes