added differentlocationclass, working version