Fixed bug and added comment to target classes function