basically working, but not really spec-correct