Implement exec function in init