duplicated code removed
more unused code removed