improved slightly. Debugging still broken