added init function