added code snippet for melkman