adding init codes