removed unused parts of the code