Design of a haptic device for finger and hand rehabilitation