use provided data when no item found in db
implemented callback in setTemplate