factor out constants