creating init func