Tabs fixed

re-using a function for multi class instance:

http://stackoverflow.com/q/23521374/1604169