fixed bug, removed stale code