minor changes, still buggy