Added dist argument