pruned old code