adding attribute methods and bug fixes