replace eval by getattr