simplify `ref`

fixes #50