fix bugs and add options to request