Improved code that deals with editions