added options and new  main file