add function for completion