working on calling init functions in right order