refactor 'options' arguments. Add delete function