changes for better testability