removed obsolete methods and made everything more efficient