Added snippet for function