removed lot of unused code