[Updated code]