re-factoring done
Doc updated