Changed the initialisation function