Added method and alloc functionality