Modified dash function