revision for options and some small fixes