Changed to init function in fun