Updated code for completion