Improved code ;-)