removed confusing unused code