minor improvements, but still some issues