make fn of defaction optional