Update code for last issue