Version 2

- added class detection