Implemented magic methods.