expose functionality for testing