Added init function, this is called whitin the script