implement value patterns