added code deleted by mistake

Added the end of the code that was deleted by mistake.