make resourse optional