update code to use options array for requests