Updated version by hand