refactoring into 'before snapshot' and platform
run this, then take snapshot