adds magic methods