added getInfo method for inspector and refactoring