Updated code May 21