added several methods and made small changes