Removed test code, reactivated orginal code