removed unused chunks of code