call those functions in the right order