Implemented invoke

See #855