added implementation for \ArrayAccess
added magic methods