added options and better interface