removed all unused code (from this branch)