further stability and speed improvements