Improvements over the original version