deleted some unused functions and variables