added extra options and a closemethod