Updated code as requested