removing some unused code and updating