added options, removing some bugs