Added code that was omitted