A multifunctional setup for robot-mediated hand rehabilitation