last working copy. Cleanup needed