added instance transformation suggested by sanjaymann