restructuring and added options