Fixed #17

Implement initialise function