added free_opt