refactored tests and more constant use