adds test, supports buffer, separates load from file